/* 
 * File:   mailman.h
 * Author: brian
 *
 * Created on October 29, 2011, 10:40 AM
 */

#ifndef MAILMAN_H
#define	MAILMAN_H

typedef struct
{
    char messages[10][10][4]; 	// Mailmans storage space - [sender][receiver][message]
    int sProc[10][10];		// Mailman send queue     - [sender][receiver]
} MAILMAN;

// Assign values to MAILMAIN variables
void initializeMailMan(MAILMAN *mailman);

/*
 * Checks is the process needs to be blocked.
 * 
 * Returns 0 if not blocked.
 * Returns 1 if the process needs to be blocked.
 */
int isBlocked(MAILMAN *mailman, int process, char operand[]);

#endif	/* MAILMAN_H */
